/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ucmconfchecker.pArchitecture;

/**
 *
 * @author Administrador
 */
public class Responsibility {
    String name;
    Component component;
    public Responsibility(Component component, String name){
        this.component = component;
        this.name = name;
        
    }
    @Override
    public String toString(){
        return name;
    }

    public String getName(){
        return name;
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Responsibility other = (Responsibility) obj;
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        if (this.component != other.component && (this.component == null || !this.component.equals(other.component))) {
            return false;
        }
        return true;
    }
    public int hashCode(){
        return toString().hashCode();
    }

    public Component getComponent() {
        return component;
    }
}
